package com.tchy.cloud.entity;

import javax.persistence.*;
import java.util.Date;

import static javax.persistence.GenerationType.IDENTITY;

/**
 * xmweilove
 */
@Entity
@Table(name = "c_questionnaire", schema = "", catalog = "")
public class CQuestionnaireEntity {
    private Integer id;//主键 questionnaire_id

    //    private Integer sortId;//量表分类id  questionnaire_sort_id
    private CQuestionnaireSortEntity questSortEntity;

    private String name;//量表名称 name
    private String backgroud;//量表背景图 backgroud
    private String glanguage;//指导语 guide_language
    private String brief;//简介
    private Integer sort;//排序 sort
    private Integer showType;//1.折线图 2.区域图 3.柱形图 4.饼状图 show_type
    private Integer template;//是否模版 template
    private Integer effective;//是否有效 effective
    private Integer deleted;//是否删除 deleted
    private Integer isShow;//是否心询网量表中显示 show_xinxun

    //    private Integer platId;//所属平台id platform_id
    private CPlatformEntity platformEntity;

    private Date createTime;//创建时间 create_time
    private Integer homeShow;//是否首页显示 home_show

    @Id
    @GeneratedValue(strategy = IDENTITY)
    @Column(name = "questionnaire_id")
    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }


    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "questionnaire_sort_id")
    public CQuestionnaireSortEntity getQuestSortEntity() {
        return questSortEntity;
    }

    public void setQuestSortEntity(CQuestionnaireSortEntity questSortEntity) {
        this.questSortEntity = questSortEntity;
    }


//    public Integer getSortId() {
//        return sortId;
//    }
//
//    public void setSortId(Integer sortId) {
//        this.sortId = sortId;
//    }

    @Basic
    @Column(name = "name")
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    @Basic
    @Column(name = "backgroud")
    public String getBackgroud() {
        return backgroud;
    }

    public void setBackgroud(String backgroud) {
        this.backgroud = backgroud;
    }

    @Basic
    @Column(name = "guide_language")
    public String getGlanguage() {
        return glanguage;
    }

    public void setGlanguage(String glanguage) {
        this.glanguage = glanguage;
    }


    @Basic
    @Column(name = "sort")
    public Integer getSort() {
        return sort;
    }

    public void setSort(Integer sort) {
        this.sort = sort;
    }

    @Basic
    @Column(name = "show_type")
    public Integer getShowType() {
        return showType;
    }

    public void setShowType(Integer showType) {
        this.showType = showType;
    }


    @Basic
    @Column(name = "brief")
    public String getBrief() {
        return brief;
    }

    public void setBrief(String brief) {
        this.brief = brief;
    }

    @Basic
    @Column(name = "template")
    public Integer getTemplate() {
        return template;
    }

    public void setTemplate(Integer template) {
        this.template = template;
    }

    @Basic
    @Column(name = "effective")
    public Integer getEffective() {
        return effective;
    }

    public void setEffective(Integer effective) {
        this.effective = effective;
    }

    @Basic
    @Column(name = "deleted")
    public Integer getDeleted() {
        return deleted;
    }

    public void setDeleted(Integer deleted) {
        this.deleted = deleted;
    }

    @Basic
    @Column(name = "show_xinxun")
    public Integer getIsShow() {
        return isShow;
    }

    public void setIsShow(Integer isShow) {
        this.isShow = isShow;
    }

//    @Basic
//    @Column(name = "platform_id")
//    public Integer getPlatId() {
//        return platId;
//    }
//
//    public void setPlatId(Integer platId) {
//        this.platId = platId;
//    }

    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "platform_id")
    public CPlatformEntity getPlatformEntity() {
        return platformEntity;
    }

    public void setPlatformEntity(CPlatformEntity platformEntity) {
        this.platformEntity = platformEntity;
    }

    @Basic
    @Column(name = "create_time")
    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }


    @Basic
    @Column(name = "home_show")
    public Integer getHomeShow() {
        return homeShow;
    }

    public void setHomeShow(Integer homeShow) {
        this.homeShow = homeShow;
    }
}
